Optimal. Leaf size=52 \[ \frac {i \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3570, 212}
\begin {gather*} \frac {i \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3570
Rubi steps
\begin {align*} \int \frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx &=\frac {(2 i) \text {Subst}\left (\int \frac {1}{2-a x^2} \, dx,x,\frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=\frac {i \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.44, size = 70, normalized size = 1.35 \begin {gather*} \frac {2 i e^{i (c+d x)} \tanh ^{-1}\left (\sqrt {1+e^{2 i (c+d x)}}\right )}{d \sqrt {1+e^{2 i (c+d x)}} \sqrt {a+i a \tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 136 vs. \(2 (41 ) = 82\).
time = 0.84, size = 137, normalized size = 2.63
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \sin \left (d x +c \right ) \sqrt {2}}{d \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )-1\right ) a}\) | \(137\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 149 vs. \(2 (39) = 78\).
time = 0.44, size = 149, normalized size = 2.87 \begin {gather*} -\frac {1}{2} i \, \sqrt {2} \sqrt {\frac {1}{a d^{2}}} \log \left (-\frac {4 \, {\left ({\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} - i\right )} e^{\left (-i \, d x - i \, c\right )}}{d}\right ) + \frac {1}{2} i \, \sqrt {2} \sqrt {\frac {1}{a d^{2}}} \log \left (-\frac {4 \, {\left ({\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} - i\right )} e^{\left (-i \, d x - i \, c\right )}}{d}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec {\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {1}{\cos \left (c+d\,x\right )\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________